package com.chefu.system.service.impl;

import com.chefu.system.mapper.ModuleMapper;
import com.chefu.system.pojo.Module;
import com.chefu.system.service.ModuleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author goodgoodstudy
 * @since 2021-03-30
 */
@Service
public class ModuleServiceImpl extends ServiceImpl<ModuleMapper, Module> implements ModuleService {

    @Autowired
    private ModuleMapper moduleMapper;

    @Override
    public List<Module> findAll() {

        return moduleMapper.selectList(null);
    }

    @Override
    public List<String> findRoleModuleByRoleId(Long roleId) {
        return moduleMapper.findRoleModuleByRoleId(roleId);

    }
}
